package main

//在asserts命令后追加 -t 命令设置需要编译的静态文件目录

import (
	_ "app"
	"path"
	_ "xrt"
	"xrt/constants"
	. "xrt/core"
	"xrt/utils/file"
)

func init() {
	if configsMap, err := file.LoadIni(path.Join(constants.RootPath, "./configs.ini")); err != nil {
		panic(err.Error())
	} else {
		//初始化框架
		X.Initial(
			configsMap.GetBool("server.debug"), configsMap.GetBool("server.use_max_cpu"),
			configsMap.GetString("server.log_path"), configsMap.GetString("server.log_level"),
			configsMap.GetBool("static_pkg"), configsMap.Section)
	}
}

func main() {
	X.StartServe()
}
